using System;
using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;
using System.Data.Entity.ModelConfiguration.Configuration;
using ESoft.Core.DAO;
using ESoft.Core.Data.Entity;

namespace Edu.Web.Data.Entity
{
    /// <summary>
    /// User
    /// </summary>    
	[Table("user")]
    public partial class UserEntity : BaseModel<long>
    {		    
        /// <summary>
        /// 
        /// </summary>
		[Column("user_name")]
        public string UserName { get; set; }
    
        /// <summary>
        /// 
        /// </summary>
		[Column("user_password")]
        public string UserPassword { get; set; }
    
        /// <summary>
        /// 姓名
        /// </summary>
		[Column("real_name")]
        public string RealName { get; set; }
    
        /// <summary>
        /// 1男2女
        /// </summary>
		[Column("gender")]
        public int? Gender { get; set; }
    
        /// <summary>
        /// 创建日期
        /// </summary>
		[Column("create_time")]
        public DateTime? CreateTime { get; set; }
    
        /// <summary>
        /// 1学生2老师3普通用户
        /// </summary>
		[Column("user_type")]
        public int? UserType { get; set; }
    }

	public class UserEntityRegstHelper : IEntityMapper
    {
        public void RegistTo(ConfigurationRegistrar configurations)
        {
            configurations.Add<UserEntity>(new EntityTypeConfiguration<UserEntity>());
        }
    }
}

